import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

// 全局样式包含element
import './style/common.scss'
// 路由权限
import './utils/permission'
// 自定义全局组件注册
import MyComponentsPlugin from '@/components/config'
// svg icons
import '@/icons'

import { loadAllPlugins } from './plugins'

// 正常开发情况下请把生产环境mock注释
if (process.env.NODE_ENV === 'development') {
   const { mockXHR } = require('../mock')
   mockXHR()
}

const app = createApp(App)

// 加载所有插件
loadAllPlugins(app)

app.use(store)
   .use(router)
   .use(MyComponentsPlugin)
   .mount('#app')
